<template>
  <div>
    <TableSlot :tableData="logsList" :tableCloumn="tableCloumn">
      <template #default="obj">
        <el-button type="success" @click="toShow(obj)">查看</el-button>
      </template>
    </TableSlot>
  </div>
</template>

<script>
  import TableSlot from '@/components/common/TableSlot.vue'
  export default {
    components: {
      TableSlot
    },
    data() {
      return {
        logsList: [{
          logId: 1,
          username: '张三',
          remark: '登录系统'
        }, {
          logId: 2,
          username: '李四',
          remark: '修改用户'
        }, {
          logId: 3,
          username: '王五',
          remark: '退出系统'
        }, {
          logId: 4,
          username: '赵六',
          remark: '添加用户'
        }],
        tableCloumn: [{
          propKey: "logId",
          labelKey: "编号",
          widthKey: 100
        }, {
          propKey: "username",
          labelKey: "用户名",
          widthKey: 180
        }, {
          propKey: "remark",
          labelKey: "备注",
          widthKey: 480
        }]
      }
    },
    methods:{
      toShow(obj){
        console.log(obj)
      }
    }
  }
</script>

<style>
</style>
